package com.chaoyi.controller.ifs;

import java.util.List;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.alibaba.fastjson.JSONObject;
import com.chaoyi.model.PrivatePlay;
import com.chaoyi.service.PrivatePlayService;
/**
 * 私播接口
 * @author wbf
 */
@Controller
@RequestMapping("/privatePlayIfs")
public class PrivatePlayIfsController {
	@Resource
	PrivatePlayService privatePlayService;
	
	//这个接口没有分页
	@RequestMapping("getPrivatePlayList")
	@ResponseBody
	public JSONObject getPrivatePlayList(HttpServletRequest request, HttpServletResponse response){
		response.setHeader("Access-Control-Allow-Origin", "*");
		JSONObject json = new JSONObject();
		List<PrivatePlay> list = privatePlayService.findAllList();
		json.put("rows", list);
		return json;
	}
}